class smx_system {
  $base_packages_list = [
    'unzip',
    'gcc-c++',
    'libstdc++-devel',
    'cmake',
    'gcc',
    'pcre-devel',
    'openssl',
    'openssl-devel',
    'libxml2-devel',
  ]

  #  package { 'nscd' :
  #    ensure => latest,
  #  }

  #  service { 'nscd' :
  #    ensure => running,
  #    before => Package[$base_packages_list],
  #    require => Package['nscd'],
  #  }
  package { $base_packages_list :
    ensure => installed,
    before => Notify['pkg-install'],
  }

  notify { 'pkg-install':
    message => '----- Base pkgs installation completed -----',
  }

  user { "vagrant":
    ensure     => present,
    gid        => 'vagrant',
    shell      => '/bin/bash',
    home       => '/home/vagrant',
    managehome => true,
    require    => Group['vagrant'],
  }

  group { "vagrant":
    ensure => present,
  }

  file { '/vagrant/vagrant/functions.sh':
    ensure  => present,
    mode    => 755, owner => root, group => root,
    source  =>  "puppet:///modules/smx_system/functions.sh",
    require => File['/vagrant/vagrant'],
  }

  file { '/vagrant':
    ensure => directory,
    mode   => 755, owner => root, group => root,
  }

  file { '/vagrant/vagrant':
    ensure => directory,
    mode   => 755, owner => root, group => root,
  }

  file { '/vagrant/vagrant/svcconfig':
    ensure => directory,
    mode   => 755, owner => root, group => root,
  }

  file { '/vagrant/vagrant/svcconfig/id_rsa':
    ensure => directory,
    mode   => 755, owner => root, group => root,
  }

  file { '/vagrant/vagrant/svcconfig/id_rsa/id_rsa':
    ensure => file,
    mode   => 600, owner => root, group => root,
    source =>  "puppet:///modules/smx_system/id_rsa",
  }
}
